﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SpiderHelper.Index
{
    public class Default
    {
        public List<Model.TempDoc> GetDocsFromChannel(Model.CollectionChannel channel, DavidDB.ADO.DBManager db)
        {
            if (channel.SiteId == 1)
            {
                return new Tools.Sina.SinaVisitor().ReadSina(channel, db);
            }
            else if (channel.SiteId == 2)
            {
                return new Tools.StockStar.StockStarVisiter().ReadStockStar(channel, db);
            }
            else if (channel.SiteId == 3)
            {
                return new Tools.MMOnly.MMVisitor().ReadMMOnly(channel, db);
            }
            else
            {
                return null;
            }

        }
    }
}
